package com.androidhive.dashboard;

import second.dashboard.AboutUfollo_Activity;
import second.dashboard.CaringFriends_Activity;
import second.dashboard.Recommendationst_Activity;
import second.dashboard.UfolloVideos_Activity;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.drawable.GradientDrawable;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import androidhive.dashboard.R;

public class MoreContent_Activity extends ActionBarActivity {

	// This is a handle so that we can call methods on our service

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.secondary_dashboard_layout);
		customizeactionBar();
	

		/**
		 * Changing appearance of ActionBar
		 * */
		// http://jgilfelt.github.io/android-actionbarstylegenerator/#name=example&compat=appcompat&theme=light&actionbarstyle=solid&texture=1&hairline=0&backColor=9e2e2e%2C100&secondaryColor=e4e4e4%2C100&tabColor=33B5E5%2C100&tertiaryColor=F2F2F2%2C100&accentColor=33B5E5%2C100&cabBackColor=FFFFFF%2C100&cabHighlightColor=33B5E5%2C100

		/**
		 * Creating all buttons instances
		 * */
		// Dashboard News feed button
		Button btn_videos= (Button) findViewById(R.id.btn_whos_Jesus);

		// Dashboard Friends button
		Button btn_caringFriends = (Button) findViewById(R.id.btn_discipleship);

		// Dashboard Messages button
		Button btn_recommendations = (Button) findViewById(R.id.btn_testimony);

		// Dashboard Places button
		Button btn_aboutUfollo = (Button) findViewById(R.id.btn_places);

		/**
		 * Handling all button click events
		 * */

		// Listening to News Feed button click
		btn_videos.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View view) {
				// Launching News Feed Screen
				Intent i = new Intent(getApplicationContext(),
						UfolloVideos_Activity.class);
				startActivity(i);
			}
		});

		// Listening Friends button click
		btn_caringFriends.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View view) {

				Intent i = new Intent(getApplicationContext(),
						CaringFriends_Activity.class);
				startActivity(i);
			}
		});

		// Listening Messages button click
		btn_recommendations.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View view) {
				// Launching News Feed Screen
				Intent i = new Intent(getApplicationContext(),
						Recommendationst_Activity.class);
				startActivity(i);
			}
		});

		// Listening to Places button click
		btn_aboutUfollo.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View view) {
				// Launching News Feed Screen
				Intent i = new Intent(getApplicationContext(),
						AboutUfollo_Activity.class);
				startActivity(i);
			}
		});
	}

	private void customizeactionBar() {
		// TODO Auto-generated method stub
		ActionBar ab = getSupportActionBar();
		GradientDrawable gd = new GradientDrawable(
				GradientDrawable.Orientation.TR_BL, new int[] {
						Color.parseColor("#090606"),
						Color.parseColor("#FA0202") });
		ab.setBackgroundDrawable(gd);
	}

}